//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    class InputCells : IOfficeXmlSerializable
    {
        private string _r;
        private bool _deleted;
        private bool _undone;
        private string _val;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("inputCells"))
            {
                _r = c.GetString("r");
                _deleted = c.GetOptionalBoolean("deleted", false);
                _undone = c.GetOptionalBoolean("undone", false);
                _val = c.GetOptionalString("val");
                int? _numFmtId = c.GetOptionalInteger("numFmtId"); //\\
            }
        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("inputCells"))
            {
                c.SetString("r", _r);
                c.SetOptionalBoolean("deleted", _deleted, false);
                c.SetOptionalBoolean("undone", _undone, false);
                c.SetOptionalString("val", _val);
                //\\int _numFmtId = c.GetOptionalInteger("numFmtId"); //\\
            }
        }
    }
}